Example:The following example shows how to use an user property list.
import com.cete.dynamicpdf.*; import com.cete.dynamicpdf.pageelements.*; public class MyClass{ public static void main(String args[]){ // Create a PDF Document Document document = new Document(); // Specify document as a tagged PDF document.setTag(new TagOptions()); // Create a page and add it to the document Page page = new Page(); document.getPages().add(page); // Create a text area TextArea textArea = new TextArea("This is the " + "text of a TextArea", 100, 100, 400, 30, Font.getHelveticaBoldOblique(), 18); // Create a structue element StructureElement structureElement = new StructureElement(TagType.getParagraph(), true); // Create an user property list and add properties to it UserPropertyList list = new UserPropertyList(); list.add("Height", 100); list.add("Align", "Left"); // Add user property list to the structure element structureElement.getAttributeLists().add(list); // Tag the text area with the structure element textArea.setTag(structureElement); // Add the text area to the page page.getElements().add(textArea); //Save the PDF document.draw("[PhysicalPath]/MyDocument.pdf" ); } }